package org.kgc.alanhealth.entity;

import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName hospital_order
 */
@Data
public class HospitalOrder implements Serializable {
    /**
     * 订单
     */
    private Integer id;

    /**
     * 商品（1：为付款0：为未付款）
     */
    private Integer commodity;

    /**
     * 地址（1：为付款0：为未付款）
     */
    private Integer address;

    /**
     * 全部（1：为付款0：为未付款）
     */
    private Integer whole;

    /**
     * 待付款（1：为付款0：为未付款）
     */
    private Integer tobepaid;

    /**
     * 待发货（1：为付款0：为未付款）
     */
    private Integer tobedelivered;

    /**
     * 待收货（1：为付款0：为未付款）
     */
    private Integer tobereceived;

    /**
     * 已完成（1：为付款0：为未付款）
     */
    private Integer completed;

    /**
     * 已取消（1：为付款0：为未付款）
     */
    private Integer cancelled;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        HospitalOrder other = (HospitalOrder) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCommodity() == null ? other.getCommodity() == null : this.getCommodity().equals(other.getCommodity()))
            && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
            && (this.getWhole() == null ? other.getWhole() == null : this.getWhole().equals(other.getWhole()))
            && (this.getTobepaid() == null ? other.getTobepaid() == null : this.getTobepaid().equals(other.getTobepaid()))
            && (this.getTobedelivered() == null ? other.getTobedelivered() == null : this.getTobedelivered().equals(other.getTobedelivered()))
            && (this.getTobereceived() == null ? other.getTobereceived() == null : this.getTobereceived().equals(other.getTobereceived()))
            && (this.getCompleted() == null ? other.getCompleted() == null : this.getCompleted().equals(other.getCompleted()))
            && (this.getCancelled() == null ? other.getCancelled() == null : this.getCancelled().equals(other.getCancelled()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCommodity() == null) ? 0 : getCommodity().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        result = prime * result + ((getWhole() == null) ? 0 : getWhole().hashCode());
        result = prime * result + ((getTobepaid() == null) ? 0 : getTobepaid().hashCode());
        result = prime * result + ((getTobedelivered() == null) ? 0 : getTobedelivered().hashCode());
        result = prime * result + ((getTobereceived() == null) ? 0 : getTobereceived().hashCode());
        result = prime * result + ((getCompleted() == null) ? 0 : getCompleted().hashCode());
        result = prime * result + ((getCancelled() == null) ? 0 : getCancelled().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", commodity=").append(commodity);
        sb.append(", address=").append(address);
        sb.append(", whole=").append(whole);
        sb.append(", tobepaid=").append(tobepaid);
        sb.append(", tobedelivered=").append(tobedelivered);
        sb.append(", tobereceived=").append(tobereceived);
        sb.append(", completed=").append(completed);
        sb.append(", cancelled=").append(cancelled);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}